-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Clarify that cargo doc --no-deps
is cumulative and won’t delete prev
#15800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify that cargo doc --no-deps
is cumulative and won’t delete prev
#15800
Conversation
b5fbe40
to
465c2af
Compare
src/doc/man/cargo-doc.md
Outdated
@@ -31,6 +31,15 @@ option. | |||
|
|||
{{#option "`--no-deps`" }} | |||
Do not build documentation for dependencies. | |||
|
|||
**Note:** Documentation is _cumulative_. If you’ve already run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cumulative behavior is not specific to the --no-deps
flag. I would personally prefer to seeing this in DESCRIPTION than here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I have added this information in DESCRIPTION.
src/doc/man/cargo-doc.md
Outdated
old dependency docs. To remove them, you can either: | ||
|
||
1. Run `cargo clean --doc` before `cargo doc --no-deps`, or | ||
2. Manually delete the unwanted folders under `target/doc/`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did this call out manually? Anything cargo clean --doc
can't achieve?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This hasn't been addressed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been fixed, thanks !
892bd12
to
55cb10b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why putting this in draft again. Ready for review?
src/doc/man/cargo-doc.md
Outdated
old dependency docs. To remove them, you can either: | ||
|
||
1. Run `cargo clean --doc` before `cargo doc --no-deps`, or | ||
2. Manually delete the unwanted folders under `target/doc/`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This hasn't been addressed.
src/doc/man/cargo-doc.md
Outdated
simply prevent *rebuilding* those pages—they will remain until you | ||
explicitly clean them up. | ||
|
||
### Removing old docs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't feel like "Remvoing old docs" requires its own paragraph. We should probably put less doc on this.
Perhaps in combination of the previous paragraph, we do this
Documentation generation is cumulative: existing doc files in the target directory are preserved across different
cargo doc
invocations. To remove existing generated docs, pass--doc
to {{man "cargo-clean" 1}}.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
55cb10b
to
330f1de
Compare
One test failed for docs so i am fixing it and then i will push the changes again. |
4986b8f
to
b29b82e
Compare
b29b82e
to
004fa29
Compare
23e20fc
to
7e44417
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normally I would suggest splitting the second commit (fixing lint error) into its own pull request, though it is too much a hassle here atm so going to merge it as-is. I would still encourage fixing unrelated errors separately in the future.
Thanks for the contribution anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found some more stuff to change.
Given that, I would suggest doing this in a separate PR.
These were caught with the latest nightly This was pulled from rust-lang#15800
### What does this PR try to resolve? Unblock CI ### How to test and review this PR? ### Notes These were caught with the latest nightly This was pulled from #15800
cargo doc --no-deps
is cumulative and won’t delete prev issue #15728cargo doc --no-deps
is cumulative and won’t delete prev
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Update cargo 23 commits in 840b83a10fb0e039a83f4d70ad032892c287570a..9a0712751ca9444775c7352d3c942a155b656437 2025-07-30 13:59:19 +0000 to 2025-08-15 20:30:47 +0000 - Fixes error while running the cargo clippy --all-targets -- -D warning (rust-lang/cargo#15843) - Clarify that `cargo doc --no-deps` is cumulative and won’t delete prev (rust-lang/cargo#15800) - docs: Formatting and cross-linking to build-dir/target-dir docs (rust-lang/cargo#15840) - Stabilize `build.build-dir` (rust-lang/cargo#15833) - make resolve features public for cargo-as-a-library (rust-lang/cargo#15835) - chore(deps): bump slab from 0.4.10 to 0.4.11 (rust-lang/cargo#15832) - chore: remove x86_64-apple-darwin from CI and tests (rust-lang/cargo#15831) - chore(deps): update msrv (3 versions) to v1.87 (rust-lang/cargo#15819) - perf(package): Always reuse the workspace's target-dir (rust-lang/cargo#15783) - More helpful error for invalid cargo-features = [] (rust-lang/cargo#15781) - Add initial integration for `--json=timings` behing `-Zsection-timings` (rust-lang/cargo#15780) - add is_inherited methods to InheritableDependency and InheritableField (rust-lang/cargo#15828) - chore(deps): update compatible (rust-lang/cargo#15804) - docs(unstable): Link out to the Plumbing commands effort (rust-lang/cargo#15821) - chore(deps): update cargo-semver-checks to v0.43.0 (rust-lang/cargo#15825) - test(build-std): relax the thread name assertion (rust-lang/cargo#15822) - chore(deps): update msrv (1 version) to v1.89 (rust-lang/cargo#15815) - Update semver tests for 1.89 (rust-lang/cargo#15816) - Accessing each build script's `OUT_DIR` and in the correct order (rust-lang/cargo#15776) - chore: bump to 0.92.0; update changelog (rust-lang/cargo#15807) - docs: `-Zpackage-workspace` has been stabilized (rust-lang/cargo#15808) - chore(deps): update rust crate cargo_metadata to 0.21.0 (rust-lang/cargo#15795) - docs(build-rs): Fix broken intra-doc links (rust-lang/cargo#15810) r? ghost
Update cargo 28 commits in 840b83a10fb0e039a83f4d70ad032892c287570a..71eb84f21aef43c07580c6aed6f806a6299f5042 2025-07-30 13:59:19 +0000 to 2025-08-17 17:18:56 +0000 - update tests to match lint message changes from #140794 (rust-lang/cargo#15849) - chore: downgrade to [email protected] (rust-lang/cargo#15851) - Reorder `lto` options in profiles.md (rust-lang/cargo#15841) - feat(unstable): add -Zbuild-analysis unstable feature (rust-lang/cargo#15845) - refactor(unstable): group stabilized features (rust-lang/cargo#15846) - Fixes error while running the cargo clippy --all-targets -- -D warning (rust-lang/cargo#15843) - Clarify that `cargo doc --no-deps` is cumulative and won’t delete prev (rust-lang/cargo#15800) - docs: Formatting and cross-linking to build-dir/target-dir docs (rust-lang/cargo#15840) - Stabilize `build.build-dir` (rust-lang/cargo#15833) - make resolve features public for cargo-as-a-library (rust-lang/cargo#15835) - chore(deps): bump slab from 0.4.10 to 0.4.11 (rust-lang/cargo#15832) - chore: remove x86_64-apple-darwin from CI and tests (rust-lang/cargo#15831) - chore(deps): update msrv (3 versions) to v1.87 (rust-lang/cargo#15819) - perf(package): Always reuse the workspace's target-dir (rust-lang/cargo#15783) - More helpful error for invalid cargo-features = [] (rust-lang/cargo#15781) - Add initial integration for `--json=timings` behing `-Zsection-timings` (rust-lang/cargo#15780) - add is_inherited methods to InheritableDependency and InheritableField (rust-lang/cargo#15828) - chore(deps): update compatible (rust-lang/cargo#15804) - docs(unstable): Link out to the Plumbing commands effort (rust-lang/cargo#15821) - chore(deps): update cargo-semver-checks to v0.43.0 (rust-lang/cargo#15825) - test(build-std): relax the thread name assertion (rust-lang/cargo#15822) - chore(deps): update msrv (1 version) to v1.89 (rust-lang/cargo#15815) - Update semver tests for 1.89 (rust-lang/cargo#15816) - Accessing each build script's `OUT_DIR` and in the correct order (rust-lang/cargo#15776) - chore: bump to 0.92.0; update changelog (rust-lang/cargo#15807) - docs: `-Zpackage-workspace` has been stabilized (rust-lang/cargo#15808) - chore(deps): update rust crate cargo_metadata to 0.21.0 (rust-lang/cargo#15795) - docs(build-rs): Fix broken intra-doc links (rust-lang/cargo#15810)
Update cargo 28 commits in 840b83a10fb0e039a83f4d70ad032892c287570a..71eb84f21aef43c07580c6aed6f806a6299f5042 2025-07-30 13:59:19 +0000 to 2025-08-17 17:18:56 +0000 - update tests to match lint message changes from #140794 (rust-lang/cargo#15849) - chore: downgrade to [email protected] (rust-lang/cargo#15851) - Reorder `lto` options in profiles.md (rust-lang/cargo#15841) - feat(unstable): add -Zbuild-analysis unstable feature (rust-lang/cargo#15845) - refactor(unstable): group stabilized features (rust-lang/cargo#15846) - Fixes error while running the cargo clippy --all-targets -- -D warning (rust-lang/cargo#15843) - Clarify that `cargo doc --no-deps` is cumulative and won’t delete prev (rust-lang/cargo#15800) - docs: Formatting and cross-linking to build-dir/target-dir docs (rust-lang/cargo#15840) - Stabilize `build.build-dir` (rust-lang/cargo#15833) - make resolve features public for cargo-as-a-library (rust-lang/cargo#15835) - chore(deps): bump slab from 0.4.10 to 0.4.11 (rust-lang/cargo#15832) - chore: remove x86_64-apple-darwin from CI and tests (rust-lang/cargo#15831) - chore(deps): update msrv (3 versions) to v1.87 (rust-lang/cargo#15819) - perf(package): Always reuse the workspace's target-dir (rust-lang/cargo#15783) - More helpful error for invalid cargo-features = [] (rust-lang/cargo#15781) - Add initial integration for `--json=timings` behing `-Zsection-timings` (rust-lang/cargo#15780) - add is_inherited methods to InheritableDependency and InheritableField (rust-lang/cargo#15828) - chore(deps): update compatible (rust-lang/cargo#15804) - docs(unstable): Link out to the Plumbing commands effort (rust-lang/cargo#15821) - chore(deps): update cargo-semver-checks to v0.43.0 (rust-lang/cargo#15825) - test(build-std): relax the thread name assertion (rust-lang/cargo#15822) - chore(deps): update msrv (1 version) to v1.89 (rust-lang/cargo#15815) - Update semver tests for 1.89 (rust-lang/cargo#15816) - Accessing each build script's `OUT_DIR` and in the correct order (rust-lang/cargo#15776) - chore: bump to 0.92.0; update changelog (rust-lang/cargo#15807) - docs: `-Zpackage-workspace` has been stabilized (rust-lang/cargo#15808) - chore(deps): update rust crate cargo_metadata to 0.21.0 (rust-lang/cargo#15795) - docs(build-rs): Fix broken intra-doc links (rust-lang/cargo#15810)
What does this PR try to resolve?
clarifies that cargo doc --no-deps will not delete previously-built dependency docs, and points users to cargo clean --doc or manual deletion if they want a truly “fresh” doc set. This pr fixed #15728
How to test and review this PR?
No testing required.